<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    {$LOAD_STYLE.top|raw}
</head>
<body>
<form class="layui-form" action="">
    <div class="mainBox">
        <div class="main-container">
            
			<div class="layui-form-item">
				<label class="layui-form-label">商家名称</label>
				<div class="layui-input-block">
				  <input type="text" name="name" value="{$model.name??''}" placeholder="请输入商家名称" class="layui-input"  verify="must">
				</div>
			</div>

			<div class="layui-form-item">
				<label class="layui-form-label">公司名</label>
				<div class="layui-input-block">
				  <input type="text" name="company" value="{$model.company??''}" placeholder="请输入公司名" class="layui-input"  verify="must">
				</div>
			</div>

			<div class="layui-form-item">
				<label class="layui-form-label">联络人</label>
				<div class="layui-input-block">
				  <input type="text" name="contact" value="{$model.contact??''}" placeholder="请输入联络人" class="layui-input">
				</div>
			</div>

			<div class="layui-form-item">
				<label class="layui-form-label">电话号码</label>
				<div class="layui-input-block">
				  <input type="text" name="phone" value="{$model.phone??''}" placeholder="请输入电话号码" class="layui-input">
				</div>
			</div>

			<div class="layui-form-item">
				<label class="layui-form-label">微信号</label>
				<div class="layui-input-block">
				  <input type="text" name="weixin" value="{$model.weixin??''}" placeholder="请输入微信号" class="layui-input">
				</div>
			</div>

			<div class="layui-form-item">
				<label class="layui-form-label">QQ号</label>
				<div class="layui-input-block">
				  <input type="text" name="qq" value="{$model.qq??''}" placeholder="请输入QQ号" class="layui-input">
				</div>
			</div>

			<div class="layui-form">
				<div class="layui-form-item" id="area-picker">
					<div class="layui-form-label">省市区</div>
					<div class="layui-input-inline" style="width: 200px;">
						<select name="province" class="province-selector" data-value="{$model.province??''}">
							<option value="">请选择省</option>
						</select>
					</div>
					<div class="layui-input-inline" style="width: 200px;">
						<select name="city" class="city-selector" data-value="{$model.city??''}">
							<option value="">请选择市</option>
						</select>
					</div>
					<div class="layui-input-inline" style="width: 200px;">
						<select name="area" class="county-selector" data-value="{$model.area??''}">
							<option value="">请选择区</option>
						</select>
					</div>
				</div>
			</div>

			<div class="layui-form-item">
				<label class="layui-form-label">地址</label>
				<div class="layui-input-block">
				  <textarea name="address" placeholder="请输入地址" class="layui-textarea">{$model.address??''}</textarea>
				</div>
			</div>
			
			<div class="layui-form-item">
				<label class="layui-form-label">备注</label>
				<div class="layui-input-block">
				  <textarea name="remark" placeholder="请输入备注" class="layui-textarea">{$model.remark??''}</textarea>
				</div>
			</div>

			<div class="layui-form-item">
				<label class="layui-form-label">到期时间</label>
				<div class="layui-input-block">
				  <input type="text" id="exp_time" name="exp_time" value="{$model.exp_time??'0000-00-00'}" placeholder="请输入到期时间" class="layui-input"  verify="must">
				</div>
			</div>
			
			<div class="layui-form-item">
				<label class="layui-form-label">状态</label>
				<div class="layui-input-block">
					<input type="checkbox" lay-skin="switch" value="status" lay-text="启用|禁用" {if $model.status??1 == 1} checked {/if}><input type="hidden" name="status" value="{$model.status??1}">
				</div>
			</div>

        </div>
    </div>
    <div class="bottom">
        <div class="button-container">
            <button type="button" class="pear-btn pear-btn-primary pear-btn-sm" lay-submit="" lay-filter="save" verify="submit">
                <i class="layui-icon layui-icon-ok"></i>
                提交
            </button>
            <button type="reset" class="layui-btn layui-btn-primary layui-btn-sm">
                <i class="layui-icon layui-icon-refresh"></i>
                重置
            </button>
        </div>
    </div>
</form>
<script>
	layui.use(['form', 'jquery', 'uploads','common','mycomm','area','laydate'], function () {
		let form = layui.form;
		let $ = layui.jquery;
		let laydate = layui.laydate;
		let common = layui.common;
		let mycomm = layui.mycomm;
		let area = layui.area;
	
		mycomm.editSubmit();
		
		laydate.render({
			elem: '#exp_time' ,//指定元素
			value:'{$model.exp_time??''}',
			type:'date'
		});
		
		area.render({
			elem: '#area-picker',
			change: function(res) {
				
			}
		});
		
	})
</script>
{$LOAD_STYLE.bottom|raw}

</body>
</html>